<?php
require dirname(__FILE__) . '/checkuser.php';
require dirname(dirname(__FILE__)) . '/include/conf.php';
require dirname(dirname(__FILE__)) . '/include/database.php';

$re = 'fail';
$msg = '没有新的';

$db = db_touzhu();
$time_start_sql = date('Y-m-d H:i:s', time() - 3600 * 2);
$sql = "select count(id) as total from half_compare where `from`=2 and type=4 and model_num>0 and unread=1";
$re_db = $db->query($sql);
if (isset($re_db[0]['total']) && $re_db[0]['total'] > 0){
	$re = 'succ';
	$msg = '有新的';
}

$result = array(
	're' => $re,
	'msg' => $msg
);
exit(json_encode($result));
